#ifndef CONFIGFILEREADER_H
#define CONFIGFILEREADER_H

#include <QObject>
#include <QPair>
#include <QStack>


typedef struct _config_object{
    QString name;
    QString path;
}CONFIGOBJECT;

typedef struct _tab{
    QString name;
    QList<CONFIGOBJECT> list;
}TAB;


class ConfigFileReader : public QObject
{
    Q_OBJECT
public:
    explicit ConfigFileReader(QObject *parent = nullptr);
    void readOrder(QString filePath);
    void read(QString filePath);
    QList<TAB>* getTabList();
    void write();

signals:


private:
    QList<TAB>* pTabList = NULL;
    QString filePath;
    QStack<QPair<QString, QStringList>> orderStack;

};

#endif // CONFIGFILEREADER_H
